The Dreamweaver JavaScript API > Deprecated functions > dreamweaver.setSelection()

 

dreamweaver.setSelection()

Availability

Dreamweaver 2.0, deprecated in 3.0 in favor of dom.setSelection().

Description

Sets the selection in the current document. This function can move the selection only within the current document; it cannot change the focus to a different document.

Arguments

offsetBegin, offsetEnd

The arguments are the begin and end points, respectively, for the new selection, expressed as byte offsets into the document's HTML source code. If the two numbers are the same, the new selection is an insertion point. If the new selection is not a valid HTML selection, it is expanded to include the characters in the first valid HTML selection. For example, if offsetBegin and offsetEnd define the range SRC="myImage.gif" within <IMG SRC="myImage.gif">, the selection expands to include the entire IMG tag.

Returns

Nothing.